package com.duoec.magichour.mapper;

import com.duoec.magichour.core.BaseMapper;
import com.duoec.magichour.pojo.ArticlePhoto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ArticlePhotoMapper extends BaseMapper<ArticlePhoto, Long> {

    /**
     * 获取某篇文章的所有图片
     * @param articleId 文章ID
     * @return
     */
    List<ArticlePhoto> listArticlePhotos(@Param("articleId") long articleId);

    /**
     * 通过ID删除记录
     * @param id article_photo.id
     */
    void deleteById(@Param("id") Long id);
}